<style>
	table th, table td{
		text-align: center !important;
	}
	.page-content .portlet .portlet-search-body .search-item{
		width: 15%;
	}
</style>


<div class="portlet">
    <div class="portlet-actions">
        <button class="btn blue btn-sm" ng-click="grid.add()"><i class="fa fa-plus"></i> 新增</button>
    </div>
    <form class="portlet-search-body" name="queryForm">
        <input type="text" class="form-control search-item" ng-model="empName" placeholder="员工姓名">
        <select class="form-control search-item search-item-expand" ng-model="status"
                ng-options="opt.value as opt.name for opt in options.empcontstatus">
            <option value="" disabled selected hidden>-- 合同状态 --</option>
        </select>
        <div class="search-item">
            <button class="btn btn-icon-only default"><i class="fa fa-chevron-right"></i></button>
            <button class="btn btn-sm query" ng-click="query();"><i class="fa fa-search"></i> 查询</button>
            <button class="btn btn-sm reset" ng-click="reset();"><i class="fa fa-eraser"></i> 重置</button>
        </div>
    </form>
    <div class="portlet-body">
        <table ed-grid="grid"  class="table table-striped table-bordered table-advance table-hover"
               data-options="url: 'empContract/query.do', modelText: 'xx列表', form: 'queryForm', modal: 'modal'">
            <thead>
            <tr>
                <th data-options="field: '_index'"></th>
                <th data-options="field: 'empName'">员工姓名</th>
                <th data-options="field: 'deptName'">部门</th>
                <th data-options="field: 'posName'">岗位</th>
                <!--<th data-options="field: 'type | code : empconttype'">合同类型</th>-->
                <th data-options="field: 'term'">合同期限</th>
                <th data-options="field: 'startdate | limitTo : 10'">开始时间</th>
                <th data-options="field: 'enddate | limitTo : 10'">终止时间</th>
                <!--<th data-options="field: 'firedate | limitTo : 10'">解除时间</th>-->
                <!--<th data-options="field: 'firereason'">解除原因</th>-->
                <th data-options="field: 'status | code : empcontstatus'">合同状态</th>
                <!--<th data-options="field: 'photo'">图片</th>-->
                <!--<th data-options="field: 'remark'">备注</th>-->
                <th>操作</th>
            </tr>
            </thead>
        </table>
    </div>
</div>

<div ed-modal="modal" data-options="title: 'xxxx', static: true, width: 720, defaultButton:false,onHidden:'reset'">
    <form action="#" class="form-horizontal w5c-form" w5c-form-validate novalidate name="validateForm">
        <div class="form-body">

        	<div class="form-group">
				<label class="col-md-2 control-label">员工姓名</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="empName" ng-model="empContract.empName" required>
            	</div>
				<label class="col-md-2 control-label">部门</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="deptName" ng-model="empContract.deptName" required>
				</div>
            </div>

        	<div class="form-group">
				<label class="col-md-2 control-label">岗位</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="posName" ng-model="empContract.posName" required>
            	</div>
				<label class="col-md-2 control-label">合同期限</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="term" ng-model="empContract.term" pattern="^(0|[1-9][0-9]*)$" required>
				</div>
            </div>

			<!--<div class="form-group">
            <!--<label class="col-md-2 control-label">合同类型</label>
                <div class="col-md-4">
                    <select class="form-control" name="type" ng-model="empContract.type"
                            ng-options="opt.value as opt.name for opt in options.empconttype" required>
                        <option value="" disabled selected hidden>&#45;&#45; 合同类型 &#45;&#45;</option>
                    </select>
                </div>
            </div>-->

        	<div class="form-group">
				<label class="col-md-2 control-label">开始时间</label>
				<div class="col-md-4">
					<input type="text" class="form-control" ed-date-picker name="startdate" ng-model="empContract.startdate" required>
            	</div>
				<label class="col-md-2 control-label">终止时间</label>
				<div class="col-md-4">
					<input type="text" class="form-control" ed-date-picker name="enddate" ng-model="empContract.enddate" required>
            	</div>
            </div>
        	<!--<div class="form-group">
				<label class="col-md-2 control-label">解除时间</label>
				<div class="col-md-4">
					<input type="text" class="form-control" ed-date-picker name="firedate" ng-model="empContract.firedate" required>
            	</div>
				<label class="col-md-2 control-label">解除原因</label>
				<div class="col-md-4">
					<input type="text" class="form-control" name="firereason" ng-model="empContract.firereason" required>
            	</div>
            </div>-->
        	<div class="form-group">
				<!--<label class="col-md-2 control-label">合同状态</label>
				<div class="col-md-4">
					<select class="form-control" name="status" ng-model="empContract.status"
							ng-options="opt.value as opt.name for opt in options.empcontstatus" required>
						<option value="" disabled selected hidden>&#45;&#45; 合同状态 &#45;&#45;</option>
					</select>
            	</div>-->
				<label class="col-md-2 control-label">备注</label>
				<div class="col-md-10">
					<input type="text" class="form-control" name="remark" ng-model="empContract.remark">
				</div>
            </div>
        </div>
        <div class="form-actions">
            <button type="button" class="btn default" ng-click="grid.cancel();">
                <i class="fa fa-times"></i> 取消
            </button>
            <button type="button" class="btn blue" w5c-form-submit="grid.save();">
                <i class="fa fa-check"></i> 确定
            </button>
        </div>
    </form>
</div>
